{% extends "dsaboard.html" %}

{% block main %}
    <h1>系列管理</h1>
    <a class="btn btn-primary btn-sm" href="{% url 'series_add' %}" ><i class="fa fa-plus"></i></a>

    <table class="table table-bordered table-hover">
        <thead>
        <tr>
            <th>序号</th>
            <th>id</th>
            <th>标题</th>
            <th>文章的个数</th>
            <th>用户的个数</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for series in series_all %}
            <tr>
                <td>{{ forloop.counter }}</td>
                <td>{{ series.pk }}</td>
                <td>{{ series.title }}</td>
                <td>{{ series.articles.count }}</td>
                <td>{{ series.users.count }}</td>

                <td>
                    <a href="{% url "series_edit" series.pk %}"><i class="fa fa-edit"></i></a>
                    <a href="{% url "series_del" series.pk %}"><i class="fa fa-trash-o"></i></a>
                </td>
            </tr>
        {% endfor %}


        </tbody>
    </table>

{% endblock %}